#include<bits/stdc++.h>
using namespace std;

long long fun(int x){
	string ans = "";
	while(x){
		ans = to_string(x%2) + ans;
		x /= 2;
	}
	return stol(ans);
}

int main(){
	int x, y;
	cin>>x>>y;
	cout<<fun(x)+fun(y);
//	cout<<(long long)pow(2, 15);
	return 0;
}
